package com.adou.d13;

import java.util.ArrayList;
import java.util.Collection;

public class Collection3 {
    public static void main(String[] args) {
        Collection<Movie> movies = new ArrayList<>();
        movies.add(new Movie("《肖生克救赎》", 9.7, "罗宾逊"));
        movies.add(new Movie("《霸王别姬》", 9.6, "张国荣"));
        movies.add(new Movie("《阿甘正传》", 9.5, "汤姆.汉克斯"));
        System.out.println(movies);// 默认存储对象地址

        for (Movie movie : movies) {
            System.out.println("电影名称：" + movie.getName());
            System.out.println("评分：" + movie.getScore());
            System.out.println("主演：" + movie.getActor());
            System.out.println("////////////////////////////////////////////");
        }

    }
}
